package com.example.mq.mqserver.mapper;


import com.example.mq.mqserver.core.Binding;
import com.example.mq.mqserver.core.Exchange;
import com.example.mq.mqserver.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MetaMapper {

    //持久化存储：表的创建
    void createTableExchange();
    void createTableBinding();
    void createTableQueue();


    //针对上述三个表，进行插入和删除
    void insertExchange(Exchange exchange);
    void deleteExchange(String exchangeName);
    List<Exchange> selectExchanges();

    void insertBinding(Binding binding);
    void deleteBinding(Binding binding);
    List<Binding> selectBindings();

    void insertQueue(MSGQueue queue);
    void deleteQueue(String QueueName);
    List<MSGQueue> selectQueues();
}


